﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace PSE.Communication.Fix.Common
{
    [DataContract]
    public class ExecutionReportEntity : BaseEntity
    {
        public ExecutionReportEntity()
        {
            
        }

        private string _sendingTime;
        [DataMember]
        public string SendingTime
        {
            get { return _sendingTime; }
            set { _sendingTime = value; }
        }

        private string _orderID;
        [DataMember]
        public string OrderID
        {
            get { return _orderID; }
            set { _orderID = value; }
        }

        private string _clOrdID;
        [DataMember]
        public string ClOrdID
        {
            get { return _clOrdID; }
            set { _clOrdID = value; }
        }

        private string _origClOrdID;
        [DataMember]
        public string OrigClOrdID
        {
            get { return _origClOrdID; }
            set { _origClOrdID = value; }
        }

        private string _secondaryOrderID;
        [DataMember]
        public string SecondaryOrderID
        {
            get { return _secondaryOrderID; }
            set { _secondaryOrderID = value; }
        }

        private string _crossID;
        [DataMember]
        public string CrossID
        {
            get { return _crossID; }
            set { _crossID = value; }
        }

        private string _execID;
        [DataMember]
        public string ExecID
        {
            get { return _execID; }
            set { _execID = value; }
        }

        private string _execRefID;
        [DataMember]
        public string ExecRefID
        {
            get { return _execRefID; }
            set { _execRefID = value; }
        }

        private string _symbol;
        [DataMember]
        public string Symbol
        {
            get { return _symbol; }
            set { _symbol = value; }
        }

        private string _securityID;
        [DataMember]
        public string SecurityID
        {
            get { return _securityID; }
            set { _securityID = value; }
        }

        private string _securityIDSource;
        [DataMember]
        public string SecurityIDSource
        {
            get { return _securityIDSource; }
            set { _securityIDSource = value; }
        }

        private string _securityExchange;
        [DataMember]
        public string SecurityExchange
        {
            get { return _securityExchange; }
            set { _securityExchange = value; }
        }

        private char _execType;
        [DataMember]
        public char ExecType
        {
            get { return _execType; }
            set { _execType = value; }
        }

        private char _ordStatus;
        [DataMember]
        public char OrdStatus
        {
            get { return _ordStatus; }
            set { _ordStatus = value; }
        }

        private char _bTSFinalTxOrdStatus;
        [Obsolete("Esse campo será removido quando o padrão de mensagem ENTRYPOINT for implantado")]
        [DataMember]
        public char BTSFinalTxOrdStatus
        {
            get { return _bTSFinalTxOrdStatus; }
            set { _bTSFinalTxOrdStatus = value; }
        }

        private int _execRestatementReason;
        [DataMember]
        public int ExecRestatementReason
        {
            get { return _execRestatementReason; }
            set { _execRestatementReason = value; }
        }

        private char _workingIndicator;
        [DataMember]
        public char WorkingIndicator
        {
            get { return _workingIndicator; }
            set { _workingIndicator = value; }
        }

        private int _ordRejReason;
        [DataMember]
        public int OrdRejReason
        {
            get { return _ordRejReason; }
            set { _ordRejReason = value; }
        }

        private double _price;
        [DataMember]
        public double Price
        {
            get { return _price; }
            set { _price = value; }
        }

        private double _stopPx;
        [DataMember]
        public double StopPx
        {
            get { return _stopPx; }
            set { _stopPx = value; }
        }

        private double _avgPx;
        [DataMember]
        public double AvgPx
        {
            get { return _avgPx; }
            set { _avgPx = value; }
        }

        private double _lastQty;
        [DataMember]
        public double LastQty
        {
            get { return _lastQty; }
            set { _lastQty = value; }
        }

        private double _lastPx;
        [DataMember]
        public double LastPx 
        {
            get { return _lastPx; }
            set { _lastPx = value; }
        }

        private double _minQty;
        [DataMember]
        public double MinQty 
        {
            get { return _minQty; }
            set { _minQty = value; }
        }

        private double _maxFloor;
        [DataMember]
        public double MaxFloor 
        {
            get { return _maxFloor; }
            set { _maxFloor = value; }
        }

        private double _leavesQty;
        [DataMember]
        public double LeavesQty 
        {
            get { return _leavesQty; }
            set { _leavesQty = value; }
        }

        private double _cumQty;
        [DataMember]
        public double CumQty 
        {
            get { return _cumQty; }
            set { _cumQty = value; }
        }

        private double _origOrdQty;
        [Obsolete("Esse campo será removido quando o padrão de mensagem ENTRYPOINT for implantado")]
        [DataMember]
        public double OrigOrdQty 
        {
            get { return _origOrdQty; }
            set { _origOrdQty = value; }
        }

        private char _timeInForce;
        [DataMember]
        public char TimeInForce 
        {
            get { return _timeInForce; }
            set { _timeInForce = value; }
        }

        private DateTime _tradeDate;
        [DataMember]
        public DateTime TradeDate
        {
            get { return _tradeDate; }
            set { _tradeDate = value; }
        }

        private string _uniqueTradeID;
        [DataMember]
        public string UniqueTradeID
        {
            get { return _uniqueTradeID; }
            set { _uniqueTradeID = value; }
        }

        private string _accountNumber;
        [DataMember]
        public string AccountNumber
        {
            get { return _accountNumber; }
            set { _accountNumber = value; }
        }

        private int _noContraBroker;
        [DataMember]
        public int NoContraBroker
        {
            get { return _noContraBroker; }
            set { _noContraBroker = value; }
        }

        private string _contraBroker;
        [DataMember]
        public string ContraBroker
        {
            get { return _contraBroker; }
            set { _contraBroker = value; }
        }

        private string _contraTrader;

        [Obsolete("Esse campo será removido quando o padrão de mensagem ENTRYPOINT for implantado")]
        [DataMember]
        public string ContraTrader
        {
            get { return _contraTrader; }
            set { _contraTrader = value; }
        }

        private string _transactTime;
        [DataMember]
        public string TransactTime
        {
            get { return _transactTime; }
            set { _transactTime = value; }
        }

        private string _text;
        [DataMember]
        public string Text
        {
            get { return _text; }
            set { _text = value; }
        }

        private int _tradeAllocIndicator;
        [Obsolete("Esse campo será removido quando o padrão de mensagem ENTRYPOINT for implantado")]
        [DataMember]
        public int TradeAllocIndicator
        {
            get { return _tradeAllocIndicator; }
            set { _tradeAllocIndicator = value; }
        }


        private char _OrdType;
        [DataMember]
        public char OrdType
        {
            get { return _OrdType; }
            set { _OrdType = value; }
        }

        private char _Side;
        [DataMember]
        public char Side
        {
            get { return _Side; }
            set { _Side = value; }
        }

        private double _OrderQty;
        [DataMember]
        public double OrderQty
        {
            get { return _OrderQty; }
            set { _OrderQty = value; }
        }

        private List<NoPartyIDEntity> _noParties;
        [DataMember]
        public List<NoPartyIDEntity> NoParties
        {
            get { return _noParties; }
            set { _noParties = value; }
        }

        private long _codMessage;
        [DataMember]
        public long CodMessage
        {
            get { return _codMessage; }
            set { _codMessage = value; }
        }

        #region [ ENTRYPOINT ]
        
        [DataMember]
        public int AccountType { get; set; } //581

        [DataMember]
        public bool AggressorIndicator { get; set; } //1057

        [DataMember]
        public string Memo { get; set; } //5149

        [DataMember]
        public double ProtectionPrice { get; set; } //35001

        [DataMember]
        public DateTime? ExpireData { get; set; } //432

        #endregion [ ENTRYPOINT ]
    }
}
